/**
 * 
 */
package com.aat.dxfy.thread.demo01;

/**
 * @date 2016年6月29日 下午1:14:37
 * @author 新歌<xingeking@163.com>
 * @email xingeking@163.com
 * @version v1.0
 * @function 功能是：
 * @info java spring
 * @update none
 */
public class SecondThread implements Runnable {
	private int i;

	public void run() {
		for (; i < 10; i++) {
			System.out.println(Thread.currentThread().getName() + " " + i);
		}
	}
	
	public static void main(String[] args) {
		for (int i = 0; i < 10; i++) {
			System.out.println(Thread.currentThread().getName()+" "+i);
			if(i==5){
				SecondThread st = new SecondThread();
				new Thread(st,"bbbb").start();
				new Thread(st,"aaaa").start();
			}
		}
	}

}
